﻿@using Freshome.b
@model Freshome.p.Models.Majoraws
@{
    ViewBag.Title = ViewBag.Category + " | 食锦";
}
<script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.min.js"
    type="text/javascript"></script>
<div id="recipes">
    @Html.Action("Majorized", "Cook", new
{
    ct = Model.Recipe_ct,
    id = Model.Majoraw_id,
    nm = Model.Majoraw_nm,
    nt = Model.Majoraw_nt
})
</div>
@section asidetail
{
    <div class="boxed">
        <h3>
            按主料选择<span>@ViewBag.Category</span></h3>
        <div>
            @foreach (var lnk in Model.Entities)
            {
                <div class="majoraw">
                    @Ajax.ActionLink(lnk.Name, "Index", "Cook", new { id = lnk.Mid, ct = Model.Recipe_ct },
                    new AjaxOptions
                    {
                        UpdateTargetId = "recipes",
                        Url = Url.Action("Majorized", "Cook", new
                        {
                            id = lnk.Mid,
                            ct = Model.Recipe_ct,
                            nm = lnk.Name,
                            nt = lnk.Notes
                        })
                    }, new { @class = "b2y", title = lnk.Notes })
                </div>
            }
        </div>
    </div>
    <div class="boxed">
        @{ Html.RenderAction("Howords", "Home", new { lead = 1 }); }
    </div>
    <div class="boxed">
        @{ Html.RenderAction("Notice", "Home", new { lead = 1 }); }
    </div>
}
